import Vue from 'vue'
import Router from 'vue-router'
import EmptyView from '../components/EmptyView'
Vue.use(Router)

export function createRouter () {
  return new Router({
    mode: 'history',
    routes: [
        {
            path: '/',
            redirect: '/home',
            component: EmptyView,
            children: [
                {
                    path: '/home',
                    name: 'Home',
                    component: () => import(/* webpackChunkName: "Home" */'../pages/Home.vue')
                },
                {
                    path: '/about',
                    name: 'About',
                    component: () => import(/* webpackChunkName: "About" */'../pages/About.vue')
                },
                {
                    path: '/topology',
                    name: 'Topology',
                    component: () => import(/* webpackChunkName: "Topology" */'../pages/Topology.vue')
                },
            ],
        },
        {
            path: '*',
            component: import('../pages/NotFound.vue')
        }
    ]
  })
}